//
// Created by Administrator on 2023/11/24.
//
#include "iostream"
#include "stack"

using namespace std;

int main() {
    char a,b,c,d;

    while(cin>>a>>b>>c>>d){
        cout<<d<<c<<b<<a<<endl;
    }
}